package com.file.system.service.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.file.system.entity.system.WebDepartmentUser;
import com.file.system.entity.res.DataPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* 部门关联账号 服务类
* @author jch
* @since 2022-08-04
*/
public interface IWebDepartmentUserService{

    //添加部门关联账号
    boolean save(WebDepartmentUser webDepartmentUser);

    //删除部门关联账号
    boolean removeById(@Param("id") Long fkUserId);

    //编辑部门关联账号
    boolean updateById(@Param("et")WebDepartmentUser webDepartmentUser);

    //编辑
    boolean update(@Param("ew") UpdateWrapper<WebDepartmentUser> query);

    //添加部门关联账号(批量)
    boolean saveBatch(@Param("list") List<WebDepartmentUser> webDepartmentUserList);

    //查询部门关联账号
    List<WebDepartmentUser> list(@Param("ew") QueryWrapper<WebDepartmentUser> query);

    //查询部门关联账号分页
    DataPage<List<WebDepartmentUser>> page(@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize, @Param("ew") QueryWrapper<WebDepartmentUser> query);

    //通过id查询部门关联账号
    WebDepartmentUser getById(@Param("id") Long id);

    //通过条件查询部门关联账号
    WebDepartmentUser getOne(@Param("ew") QueryWrapper<WebDepartmentUser> query);

    //查询部门关联账号数量
    int count(@Param("ew") QueryWrapper<WebDepartmentUser> query);

    //删除关联账号信息
    boolean remove(WebDepartmentUser webDepartmentUser);
}
